/*
package cn.wolfcode.wms.controller;

import cn.wolfcode.wms.domain.StockIncomeBill;
import cn.wolfcode.wms.qo.StockIncomeBillQueryObject;
import cn.wolfcode.wms.service.IDepotService;
import cn.wolfcode.wms.service.IStockIncomeBillService;
import cn.wolfcode.wms.util.RequiredPermission;
import cn.wolfcode.wms.vo.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@RequestMapping("/stockIncomeBill")
public class StockIncomeBillController {

    @Autowired
    private IStockIncomeBillService stockIncomeBillService;
    @Autowired
    private IDepotService depotService;

    @RequestMapping("/list")
    @RequiredPermission("入库订单列表")
    public String list(@ModelAttribute("qo") StockIncomeBillQueryObject qo, Map map) {
        map.put("depots",depotService.listAll());
        map.put("pageResult", stockIncomeBillService.query(qo));
        return "stockIncomeBill/list";
    }

    @RequestMapping("/input")
    @RequiredPermission("入库订单编辑")
    public String input(Long id, Map map) {
        map.put("suppliers", depotService.listAll());
        if (id != null) {
            map.put("stockIncomeBill", stockIncomeBillService.getById(id));
        }
        return "stockIncomeBill/input";
    }

    @RequestMapping("/saveOrUpdate")
    @RequiredPermission("更新或新增入库订单")
    public String saveOrUpdate(StockIncomeBill stockIncomeBill) {
        try {
            stockIncomeBillService.saveOrUpdate(stockIncomeBill);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "redirect:/stockIncomeBill/list.do";
    }

    @RequestMapping("/delete")
    @RequiredPermission("删除入库订单")
    public String delete(Long id) {
        stockIncomeBillService.delete(id);
        return "redirect:/stockIncomeBill/list.do";
    }

    @RequestMapping("/audit")
    @RequiredPermission("审核入库订单")
    @ResponseBody
    public JSONResult audit(Long id){
        stockIncomeBillService.audit(id);
        return JSONResult.success("审核成功");
    }

    @RequestMapping("/view")
    @RequiredPermission("查看入库订单")
    public String view(Long id,Map map){
        map.put("stockIncomeBill",stockIncomeBillService.getById(id));
        return "stockIncomeBill/view";
    }

}
*/
